import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import Login from './pages/common/Login';
import Main from './pages/Main';
import BeforeEach from './BeforeEach'
function RouterConfig(props) {
  const history = props.history
  return (
    <Router history={history}>
      <Switch>
        <Route path="/login" component={Login}></Route>
        <Route path="/" render={() => {
          return (
            <Main>
              <BeforeEach />
            </Main>
          )
        }}></Route>
      </Switch>
    </Router>
  );
}
export default RouterConfig